package com.asd.system.mapper;

import com.asd.system.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * @author
 * @createtime 2021-09-13 14:19
 * @description
 */
@Mapper
@Component
public interface RoleMapper extends BaseMapper<Role> {

    /**
     * @Description: 删除角色与用户关系
     */
    @Delete("delete from user_role where roleId = #{roleid}")
    void deleteRoleUserRelation(@Param("roleid") String roleid);

    /**
     * @Description: 删除角色与权限关系
     */
//    @Delete("delete from sys_role_permission where role_id = #{roleId}")
    void deleteRolePermissionRelation(String roleid);

}
